/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.fjut.se1603.wwm.service;

import edu.fjut.se1603.wwm.DAO.BaseDao;
import edu.fjut.se1603.wwm.DAO.impl.PetDaoImpl;
import edu.fjut.se1603.wwm.DAO.impl.PetOwnerDaoImpl;
import edu.fjut.se1603.wwm.DAO.impl.PetStoreDaoImpl;
import edu.fjut.se1603.wwm.entity.Pet;
import edu.fjut.se1603.wwm.entity.PetOwner;
import edu.fjut.se1603.wwm.entity.PetStore;
import java.sql.Connection;
import java.util.List;

/**
 *
 * @author Daydream
 */
public class login {
    public static void display()
    {
        System.out.println("宠物商店启动");
        System.out.println("Wonderland醒来，所有宠物从mysql中醒来");
        System.out.println("***************************************");
        PetDaoImpl pet=new PetDaoImpl();
        PetOwnerDaoImpl owner=new PetOwnerDaoImpl();
        PetStoreDaoImpl store=new PetStoreDaoImpl();
        List<Pet> pets=pet.getList();
        for(int i=0;i<pets.size();i++){
            System.out.println("第"+pets.get(i).getId()+"个宠物,名字叫："+pets.get(i).getName());
        }
        System.out.println("***************************************");
        System.out.println("");
        System.out.println("所有宠物主人从mysql中醒来");
        System.out.println("***************************************");
        List<PetOwner> owners=owner.getList();
        for(int j=0;j<owners.size();j++){
            System.out.println("第"+owners.get(j).getId()+"个宠物主人,名字叫："+owners.get(j).getName());            
        }
        System.out.println("***************************************");
        System.out.println("");
        System.out.println("所有宠物商店从mysql中醒来");
        System.out.println("***************************************");
        List<PetStore> stores=store.getList();
        for(int k=0;k<stores.size();k++){
            System.out.println("第"+stores.get(k).getId()+"个宠物商店,名字叫："+stores.get(k).getName());            
        }
        System.out.println("***************************************");
        System.out.println("");
        
        
    }
}
